﻿<div bsModal #editModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="editModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form #userForm="ngForm" novalidate (ngSubmit)="save()">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>日志<span *ngIf="userName"> - {{userName}}</span></span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')" [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <!--<Primeng-TurboTable-Start>-->
                    <div class="primeng-datatable-container"
                        [busyIf]="primengTableHelper.isLoading">
                        <p-table #dataTable
                                (onLazyLoad)="getLogs($event)"
                                [value]="primengTableHelper.records"
                                rows="{{primengTableHelper.defaultRecordsCountPerPage}}"
                                [paginator]="false"
                                [lazy]="true"
                                [scrollable]="true"
                                ScrollWidth="100%"
                                [responsive]="primengTableHelper.isResponsive"
                                [resizableColumns]="primengTableHelper.resizableColumns">
                            <ng-template pTemplate="header">
                                <tr>
                                    <th style="width: 150px">
                                        用户名称
                                    </th>
                                    <th style="width: 250px">
                                        服务名称
                                    </th>
                                    <th style="width: 150px">
                                        方法名称
                                    </th>
                                    <th style="width: 150px" pSortableColumn="executionTime">
                                        调用时间
                                     <p-sortIcon field="executionTime"></p-sortIcon>
                                    </th>
                                    <th style="width: 150px">
                                        执行时间
                                    </th>
                                    <th style="width: 550px">
                                        参数
                                    </th>

                                </tr>
                            </ng-template>
                            <ng-template pTemplate="body" let-record="$implicit">
                                <tr>
                                    <td style="width: 150px">
                                        <span class="ui-column-title">用户名称</span>
                                        {{record.userName}}
                                    </td>
                                    <td style="width: 250px">
                                        <span class="ui-column-title">服务名称</span>
                                        {{record.serviceName}}
                                    </td>
                                    <td style="width: 150px">
                                        <span class="ui-column-title">方法名称</span>
                                        {{record.methodName}}
                                    </td>
                                    <td style="width: 150px">
                                        <span class="ui-column-title">调用时间</span>
                                        {{record.executionTime}}
                                    </td>
                                    <td style="width: 150px">
                                        <span class="ui-column-title">执行时间</span>
                                        {{record.executionDuration}}
                                    </td>
                                    <td style="width: 550px">
                                        <span class="ui-column-title">参数</span>
                                        {{record.parameters}}
                                    </td>

                                </tr>
                            </ng-template>
                        </p-table>
                        <div class="primeng-no-data" *ngIf="primengTableHelper.totalRecordsCount == 0">
                            {{'NoData' | localize}}
                        </div>
                        <div class="primeng-paging-container">
                            <p-paginator [rows]="primengTableHelper.defaultRecordsCountPerPage"
                                         #paginator
                                         [totalRecords]="primengTableHelper.totalRecordsCount"
                                         [rowsPerPageOptions]="primengTableHelper.predefinedRecordsCountPerPage">

                            </p-paginator>
                            <span class="total-records-count">
                                {{'TotalRecordsCount' | localize:primengTableHelper.totalRecordsCount}}
                            </span>
                        </div>
                    </div>
                    <!--<Primeng-TurboTable-End>-->
                </div>
                <div class="modal-footer">
                </div>
            </form>
        </div>
    </div>
</div>
